new Vue({
    el: '#main-container',
    data: {
        pageInfo:{
            current:1,
            size:5
        },
        params:{
            check:'',
            type:'' //设置默认值
        }
    },
    methods: { select: function (current, size) {
            //查询后台，返回分页数据，更新vue的pageInfo对象
            axios({
                url: `/manager/qualification/select/${current}/${size}`,
                params:this.params
            }).then(response => {
                //箭头函数会将上下文的this（vue对象）传递过来
                // console.log(response);//获取ResultBean
                //response.data ->ResultBean<Page> ResultBean.data ->Page对象   列表数据->Page对象.records
                this.pageInfo = response.data.data;//获取ResultBean中的data
                // console.log(this.pageInfo) 查看pageInfo
            }).catch(function (error) {
                console.log(error);
            })
        },
        selectAll:function () {
            //    查询所有，不带条件
            this.params ={
                check:'',
                type:'' //设置默认值
            }
            this.select(1,this.pageInfo.size);
        }},

    created: function () {
    this.select(1,this.pageInfo.size)
    }
});